---
dimensions:
  type:
    primary: reference
    detail: core
  level: beginner
standard_title: General Specifications
language: en
title: General Specification Definitions
description: This document provides a detailed introduction to the common structures
  and specifications in Dify plugin development, including path specifications, internationalization
  objects (I18nObject), provider form structures (ProviderConfig), model configurations
  (ModelConfig), node responses (NodeResponse), and tool selectors (ToolSelector),
  defining these important data structures and their uses.
---

This article will briefly introduce common structures in plugin development. During development, it is strongly recommended to read this alongside [Basic Concepts of Plugin Development](/plugin_dev_en/0111-getting-started-dify-plugin.en) and the [Developer Cheatsheet](/plugin_dev_en/0131-cheatsheet.en) for a better understanding of the overall architecture.

### Path Specifications

When filling in file paths in Manifest or any yaml files, follow these two specifications depending on the type of file:

* If the target file is a multimedia file such as an image or video, for example when filling in the plugin's `icon`, you should place these files in the `_assets` folder under the plugin's root directory.
* If the target file is a regular text file, such as `.py` or `.yaml` code files, you should fill in the absolute path of the file within the plugin project.

### Common Structures

When defining plugins, there are some data structures that can be shared between tools, models, and Endpoints. These shared structures are defined here.

#### I18nObject

`I18nObject` is an internationalization structure that conforms to the [IETF BCP 47](https://tools.ietf.org/html/bcp47) standard. Currently, four languages are supported:

* en_US
* zh_Hans
* ja_JP
* pt_BR

#### ProviderConfig

`ProviderConfig` is a common provider form structure, applicable to both `Tool` and `Endpoint`

* `name` (string): Form item name
* `label` ([I18nObject](#i18nobject), required): Following [IETF BCP 47](https://tools.ietf.org/html/bcp47)
* `type` ([provider_config_type](#providerconfigtype-string), required): Form type
* `scope` ([provider_config_scope](#providerconfigscope-string)): Optional range, varies based on `type`
* `required` (bool): Cannot be empty
* `default` (any): Default value, only supports basic types `float` `int` `string`
* `options` (list\[[provider_config_option](#providerconfigoption-object)]): Options, only used when type is `select`
* `helper` (object): Help document link label, following [IETF BCP 47](https://tools.ietf.org/html/bcp47)
* `url` (string): Help document link
* `placeholder` (object): Following [IETF BCP 47](https://tools.ietf.org/html/bcp47)

#### ProviderConfigOption(object)

* `value` (string, required): Value
* `label` (object, required): Following [IETF BCP 47](https://tools.ietf.org/html/bcp47)

#### ProviderConfigType(string)

* `secret-input` (string): Configuration information will be encrypted
* `text-input` (string): Plain text
* `select` (string): Dropdown
* `boolean` (bool): Switch
* `model-selector` (object): Model configuration information, including provider name, model name, model parameters, etc.
* `app-selector` (object): app id
* `tool-selector` (object): Tool configuration information, including tool provider, name, parameters, etc.
* `dataset-selector` (string): TBD

#### ProviderConfigScope(string)

* When `type` is `model-selector`
  * `all`
  * `llm`
  * `text-embedding`
  * `rerank`
  * `tts`
  * `speech2text`
  * `moderation`
  * `vision`
* When `type` is `app-selector`
  * `all`
  * `chat`
  * `workflow`
  * `completion`
* When `type` is `tool-selector`
  * `all`
  * `plugin`
  * `api`
  * `workflow`

#### ModelConfig

* `provider` (string): Model provider name containing plugin_id, in the form of `langgenius/openai/openai`.
* `model` (string): Specific model name.
* `model_type` (enum): Enumeration of model types, refer to the [Model Design Rules](/plugin_dev_en/0411-model-designing-rules.en#modeltype) document.

#### NodeResponse

* `inputs` (dict): Variables that are finally input to the node.
* `outputs` (dict): Output results of the node.
* `process_data` (dict): Data generated during node execution.

#### ToolSelector

* `provider_id` (string): Tool provider name
* `tool_name` (string): Tool name
* `tool_description` (string): Tool description
* `tool_configuration` (dict\[str, Any]): Tool configuration information
* `tool_parameters` (dict\[str, dict]): Parameters that need LLM reasoning
  * `name` (string): Parameter name
  * `type` (string): Parameter type
  * `required` (bool): Whether required
  * `description` (string): Parameter description
  * `default` (any): Default
  * `options` (list\[string]): Options

## Related Resources

- [Basic Concepts of Plugin Development](/plugin_dev_en/0111-getting-started-dify-plugin.en) - Comprehensive understanding of Dify plugin development
- [Developer Cheatsheet](/plugin_dev_en/0131-cheatsheet.en) - Quick reference for common commands and concepts in plugin development
- [Tool Plugin Development Details](/plugin_dev_en/0222-tool-plugin.en) - Understanding how to define plugin information and the tool plugin development process
- [Model Design Rules](/plugin_dev_en/0411-model-designing-rules.en) - Understanding the standards for model configuration

{/*
Contributing Section
DO NOT edit this section!
It will be automatically generated by the script.
*/}

<CardGroup cols="2">
    <Card
        title="Edit this page"
        icon="pen-to-square"
        href="https://github.com/alterxyz/dify-docs-plugin-dev/edit/main/plugin_dev_en/0411-general-specifications.en.mdx"
    >
        Help improve our documentation by contributing directly
    </Card>
    <Card
        title="Report an issue"
        icon="github"
        href="https://github.com/alterxyz/dify-docs-plugin-dev/issues/new?title=Documentation%20Issue%3A%20general-specifications&body=%23%23%20Issue%20Description%0A%3C%21--%20Please%20briefly%20describe%20the%20issue%20you%20found%20--%3E%0A%0A%23%23%20Page%20Link%0Ahttps%3A%2F%2Fgithub.com%2Falterxyz%2Fdify-docs-plugin-dev%2Fblob%2Fmain%2Fplugin_dev_en%2F0411-general-specifications.en.mdx%0A%0A%23%23%20Suggested%20Changes%0A%3C%21--%20If%20you%20have%20specific%20suggestions%20for%20changes%2C%20please%20describe%20them%20here%20--%3E%0A%0A%3C%21--%20Thank%20you%20for%20helping%20improve%20our%20documentation%21%20--%3E"
    >
        Found an error or have suggestions? Let us know
    </Card>
</CardGroup>
